﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "GcmpModelInterface.h"
#include "IDbObject.h"

namespace gcmp
{
    class UniIdentity;

    /// \brief 外部参数定义绑定类
    class GCMP_MODEL_INTERFACE_EXPORT IExternalParameterDefinitionBinding : public gcmp::IDbObject
    {
        DEFINE_CAST_DERIVED(gcmp::IExternalParameterDefinitionBinding, gcmp::IDbObject);
    public:

        /// \brief 创建外部参数定义绑定对象
        /// \param isBoundToType true绑定到Type图元，false绑定到非Type图元。
        /// \param categoryUids 绑定的类别列表
        /// \return 创建的外部参数定义绑定对象
        static OwnerPtr<IExternalParameterDefinitionBinding> Create(bool isBoundToType, const std::vector<UniIdentity>& categoryUids);

        /// \brief 获取是否绑定到Type图元
        /// \return true绑定到Type图元，false绑定到非Type图元。
        virtual bool IsBoundToType() const = 0;

        /// \brief 获取绑定到的类别列表
        /// \return 绑定到的类别列表
        virtual const std::vector<UniIdentity>& GetCategoryUids() const = 0;
    };

}
